﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FireFly
{
    /// <summary>
    /// Command execution exception
    /// </summary>
    [Serializable]
    public class CommandExecutionException : Exception
    {
        private IRelayCommand _command;
        public CommandExecutionException() { }
        public CommandExecutionException(string message) : base(message) { }
        public CommandExecutionException(string message, IRelayCommand command) : base(message) 
        {
            _command = command;
        }
        public CommandExecutionException(string message, Exception inner) : base(message, inner) { }
        protected CommandExecutionException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context) { }

        public IRelayCommand Command
        {
            get
            {
                return _command;
            }
        }
    }
}
